﻿<UserControl x:Class="UploadImages.View.UploadImagesView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:converter="clr-namespace:Infrastructure.Converters;assembly=Infrastructure"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">
    <UserControl.Resources>
        <converter:WCNOLinesConverter x:Key="sourceConverter"/>
        <converter:WCNOConverter x:Key="itemConverter"/>
    </UserControl.Resources>
    <telerik:RadBusyIndicator IsBusy="{Binding IsBusy}" BusyContent="{Binding MessageContent}" DisplayAfter="0" IsIndeterminate="True" >
        <Grid Margin="5">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Grid.Row="0" Orientation="Horizontal" Margin="0 8 0 0">
                <TextBlock Text="流水线名:" Width="100"></TextBlock>
                <telerik:RadComboBox ItemsSource="{Binding WCNOLines,Converter={StaticResource sourceConverter}}" 
                                     SelectedItem="{Binding SelectedWCNOLine,Converter={StaticResource itemConverter}}" 
                                     IsEditable="False" Width="250"></telerik:RadComboBox>
            </StackPanel>
            <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 8 0 0">
                <TextBlock Text="工位:" Width="100"></TextBlock>
                <telerik:RadComboBox ItemsSource="{Binding StationNames}" SelectedItem="{Binding SelectedStationName}" 
                                     IsEditable="False" Width="250"></telerik:RadComboBox>
            </StackPanel>
            <StackPanel Grid.Row="2" Orientation="Horizontal" Margin="0 8 0 0">
                <StackPanel Orientation="Vertical">
                    <TextBlock Text="选择图片:" Width="100"></TextBlock>
                    <telerik:RadButton Width="80" Height="22" Content="选择" Margin="0 8 0 0" HorizontalAlignment="Left"
                                       Command="{Binding OpenFileCommand,Mode=TwoWay}"></telerik:RadButton>
                </StackPanel>
                <TextBox  TextWrapping="Wrap" AcceptsReturn="True" VerticalScrollBarVisibility="Auto" Height="150" Width="250"
                          Text="{Binding SelectedImageNames}" IsReadOnly="True"></TextBox>
            </StackPanel>
            <StackPanel Orientation="Horizontal" Grid.Row="3" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0 8 0 0">
                <telerik:RadButton Width="80" Height="22" Content="确定" Margin="0 0 5 0" Command="{Binding SaveCommand,Mode=TwoWay}"></telerik:RadButton>
            </StackPanel>
        </Grid>
    </telerik:RadBusyIndicator>
</UserControl>
